#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QDebug>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    udpCom = new UdpCom();
    modem = new Xymodem();
    modem->SetComInterface(udpCom);
	modem->SetFile("C:\\Users\\mriri\\Documents\\Ryan\\QT\\zap\\debug\\test.bin");
    modem->SetType("xmodem");
    modem->start();
    // modem->m_com->Connect("localhost", "62301");
}

MainWindow::~MainWindow()
{
    modem->stop();
    udpCom->Disconnect();
    delete modem;
    delete udpCom;
    delete ui;
}
